Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Inline AbstractManagedChannelImplBuilder #7424

Merged
merged 2 commits into from
Sep 22, 2020

Conversation

sergiitk
Copy link
Member

@sergiitk sergiitk commented Sep 14, 2020

Closes #7211.

Note to reviewers

Commit 75cccde preserves the order and style of AbstractManagedChannelImplBuilder in ManagedChannelImplBuilder, to highlight the changes necessary to inline the superclass:

git diff c1d6a09~:core/src/main/java/io/grpc/internal/AbstractManagedChannelImplBuilder.java c1d6a09:core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java

And the changes made to tests (mostly unchanged):

git diff c1d6a09~:core/src/test/java/io/grpc/internal/AbstractManagedChannelImplBuilderTest.java c1d6a09:core/src/test/java/io/grpc/internal/ManagedChannelImplBuilderTest.java
The following commit `cc0185c` organizes the methods and properties in `ManagedChannelImplBuilder` after inlining the superclass: 1. Package-private mutable state used for building`ManagedChannelImpl` is separated from private states and constants 2. Methods implementing `ManagedChannelBuilder` preserve the order they're defined in `ManagedChannelBuilder` 3. Private and `@VisibleForTesting` methods moved next to where they are executed or fit logically.

@sergiitk sergiitk marked this pull request as ready for review September 14, 2020 23:09
@sergiitk sergiitk marked this pull request as draft September 15, 2020 17:40
@sergiitk sergiitk removed the request for review from ejona86 September 15, 2020 17:41
@sergiitk sergiitk force-pushed the remove-abstract-channel-builder branch 5 times, most recently from 3024e3c to 75cccde Compare September 15, 2020 21:56
@sergiitk sergiitk marked this pull request as ready for review September 15, 2020 22:35
Copy link
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still a lot of changes to the AbstractManagedChannelImplBuilder code. I suggest you start with AbstractManagedChannelImplBuilder and modify it with pieces of ManagedChannelImplBuilder.

@ejona86
Copy link
Member

ejona86 commented Sep 16, 2020

As an example, I see noise like:

-  /**
-   * An idle timeout larger than this would disable idle mode.
-   */
+  /** An idle timeout larger than this would disable idle mode. */

And movement of lines like:

-  private static final Logger log =
-      Logger.getLogger(AbstractManagedChannelImplBuilder.class.getName());

@sergiitk sergiitk force-pushed the remove-abstract-channel-builder branch from 622d35f to c1d6a09 Compare September 18, 2020 19:19
@sergiitk sergiitk merged commit ef78464 into grpc:master Sep 22, 2020
@sergiitk sergiitk deleted the remove-abstract-channel-builder branch September 22, 2020 14:48
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide AbstractManagedChannelImplBuilder from public API
2 participants